/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package ecua911;

/**
 *
 * @author Vivi
 */
public class Entidad implements IEntidadChat{
    int telefono;
    String correo;
    String responsable;

    public int getTelefono() {
        return telefono;
    }

    public void setTelefono(int telefono) {
        this.telefono = telefono;
    }

    public String getCorreo() {
        return correo;
    }

    public void setCorreo(String correo) {
        this.correo = correo;
    }

    public String getResponsable() {
        return responsable;
    }

    public void setResponsable(String responsable) {
        this.responsable = responsable;
    }
    private SalonChat salon;
    
    public Entidad(SalonChat salonDeChat){
       salon = salonDeChat; 
    }
    
    @Override
    public void recibir(String de, String msg) {
        String s = "el usuario " + de + " te dice :" + msg;
        System.out.println(responsable + ": "+s);
    }

    @Override
    public void enviar(String a, String msg) {
        salon.enviar(responsable, a, msg);
    }
}
